home *** CD-ROM | disk | FTP | other *** search
- /* WinCopy v1.00 [16-Jul-1995] for Directory Opus 5.
- By Leo Davidson ("Nudel", Pot-Noodle/Gods'Gift Utilities)
-
- NOTE: This script _requires_ DOpus v5.11 or above.
-
- NOTE: This script does *NOT* do the same thing as Gary Gagnon's
- "CloneSRCE.dopus5" or "same.dopus5", read on...
-
- This script will copy the source lister to the destination lister,
- like the old copywin command in DOpus4.
-
- If you wish to open a _new_ lister which is a copy of the source
- one (as apposed to turning an existing lister into a copy of the
- source), you should use Gary Gagnon's "CloneSRCR.dopus5" script,
- which was included in the official DOpus v5.11 update as
- "DOpus5:ARexx/same.dopus5". Gary's script is also able to clone
- multiple source listers at once.
-
- If you specify the "PathOnly" option, the destination lister will
- remain in the same place and simply read the same path as the source
- lister. Otherwise, the destination lister will be moved and resized
- such that it is identical to the source lister (personally, I'd
- never want that, but the option is there if you do!).
- Remember that if you do not use the "PathOnly" option the copied
- lister may end up _behind_ your existing lister, giving the illusion
- that it has in fact been closed.
-
- Call as:
- ------------------------------------------------------------------------------
- ARexx DOpus5:ARexx/WinCopy.dopus5 {Qp} [PathOnly]
- ------------------------------------------------------------------------------
- Turn off all switches.
- */
-
- options results
- options failat 99
- signal on syntax;signal on ioerr /* Error trapping */
- parse arg DOpusPort PathOnlyOption
- DOpusPort = Strip(Strip(DOpusPort,"B"," "),"B",'"')
- PathOnlyOption = Strip(Strip(PathOnlyOption,"B"," "),"B",'"')
- If DOpusPort~="" THEN Address value DOpusPort
- ELSE Do
- Say "Not correctly called from Directory Opus 5!"
- Say "Load this ARexx script into editor for more info."
- EXIT
- END
-
- lister query source stem source_handle.
-
- IF source_handle.count = 0 | source_handle.count = "SOURCE_HANDLE.COUNT" Then Do
- dopus request '"You must have a SOURCE lister!" OK'
- EXIT
- End
-
-
- lister query dest stem dest_handle.
-
- IF dest_handle.count = 0 | dest_handle.count = "DEST_HANDLE.COUNT" Then Do
- dopus request '"You must have a DESTINATION lister!" OK'
- EXIT
- End
-
-
- lister query source_handle.0 path
- source_path = RESULT
- lister read dest_handle.0 source_path
-
-
- If PathOnlyOption ~= "PathOnly" Then Do
- lister query source_handle.0 position
- source_position = RESULT
- lister set dest_handle.0 position source_position
- END
-
- syntax:;ioerr: /* In case of error, jump here */
- EXIT
-